#ifndef NCSPROP_UTILS_H
#define NCSPROP_UTILS_H

#include <QCoreApplication>
#include <QFont>
#include <QColor>

class QFont; 
class QLayout; 
class QBrush;

namespace utils {

QPixmap createPixmapFromFont(const QFont &font);

void setupTreeViewEditorMargin(QLayout *lt); 

QPixmap brushValuePixmap(const QBrush &b);

inline QString fontValueText(const QFont &f)
{
    return QCoreApplication::translate("ncsppt", "[%1, %2]") .arg(f.family()).arg(f.pointSize());
}

inline QString colorValueText(const QColor &c)
{
    return QCoreApplication::translate("ncsppt", "[%1, %2, %3] (%4)")
        .arg(c.red()).arg(c.green()).arg(c.blue()).arg(c.alpha());
}


QIcon createCheckBoxIcon(bool value); 

QPixmap createPixmapFromFont(const QFont &font);

}


#endif // NCSPROP_UTILS_H
